home *** CD-ROM | disk | FTP | other *** search
- #define CURSES_LIBRARY 1
- #include <curses.h>
- #undef keypad
-
- #ifdef PDCDEBUG
- char *rcsid_keypad = "$Header: C:\CURSES\portable\RCS\keypad.c 2.1 1993/06/18 20:20:14 MH Rel MH $";
- #endif
-
-
-
-
- /*man-start*********************************************************************
-
- keypad() - enable keypad
-
- X/Open Description:
- This function changes the keypad option of the user's terminal.
- If enabled (bf is TRUE), the user can press a function key (such
- as the left arrow key) and getch() will return a single value
- that represents the KEY_LEFT function key. (See Section 11.3.3,
- Input Values.) If disabled, curses will not treat function keys
- as special keys and the program has to interpret the escape
- sequences itself. If the keypad is enabled, the terminal keypad
- is turned on before input begins.
-
- PDCurses Description:
- In the above text, substitute the following string:
- "escape sequences" -> "scan codes"
- "Section 11.3.3" -> "curses.h" or "intro.man"
-
- This routine is also provided as a macro.
-
- X/Open Return Value:
- The keypad() function returns OK on success and ERR on error.
-
- X/Open Errors:
- No errors are defined for this function.
-
- Portability:
- PDCurses int keypad( WINDOW* win, bool bf );
- X/Open Dec '88 int keypad( WINDOW* win, bool bf );
- BSD Curses int keypad( WINDOW* win, bool bf );
- SYS V Curses int keypad( WINDOW* win, bool bf );
-
- **man-end**********************************************************************/
-
- int keypad( WINDOW *win, bool bf )
- {
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("keypad() - called\n");
- #endif
-
- win->_use_keypad = bf;
- return( OK );
- }
-